package Day13.IO;

import java.io.*;

public class Test1 {

    public static void main(String[] args) throws IOException {
        getCao();
    }

    private static void getCao() throws IOException {
        FileInputStream fis = new FileInputStream("D:\\jiangnan1.jpg");

        FileOutputStream fos = new FileOutputStream("C:\\jiangnan1.jpg");

//        \\3、读写操作
        byte[] bys = new byte[1024];
        int len;
        while ((len = fis.read(bys))!=-1){
            fos.write(bys,0,len);
        }
        //关闭流释放资源
        fis.close();
        fos.close();
    }
}
